Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compressed nfts #523

Closed

Conversation

adpthegreat
Copy link
Contributor

  • Followed guidelines in contributing.md
  • Refactored it to use newest dependencies
  • Replaced @metaplex- foundation/js with @metaplex-foundation-umi
  • Replaced old methods with their corresponding umi methods
  • Replaced all old code snippets
  • Gave clearer variable names
  • Removed redundant code
  • Ran prettier

updated lesson code and created Unboxed PRs

solution code
starter code

- Updated to use clearer and simple language
- Updated code snippets , removed top level async , used solana helpers functions where necessary
- Renamed variables to ix to instruction
- Refactored it to use newest dependencies
- Replaced @metaplex- foundation/js with @metaplex-foundation-umi
- Replaced old methods with their corresponding umi methods
- Replaced all old code snippets
- Gave clearer variable names
- Removed redundant code
- Ran prettier
adpthegreat and others added 4 commits October 1, 2024 21:14
    - Refactored it to use newest dependencies
    - Replaced @metaplex- foundation/js with @metaplex-foundation-umi
    - Replaced old methods with their corresponding umi methods
    - Replaced all old code snippets
    - Gave clearer variable names
    - Removed redundant code
    - Ran prettier
    - Refactored codebase to be more modular
@adpthegreat
Copy link
Contributor Author

Ran prettier locally multiple times but it still fails in CI and I don't know the reason

@shawazi
Copy link
Contributor

shawazi commented Oct 2, 2024

I had the same problem:
image

I thoroughly messed up the commit history in my PR, but at the end of all the merge conflicts and rebasing, somehow the histories became aligned again.

I think you might need to git merge upstream with your fork, so that your fork's history is updated.

The order might be something like this (cd into the root directory of your fork, and make sure you're in the branch associated with your PR: adpthegreat:Update-compressed-nfts). The below code assumes your fork's PR branch is named "main":

git remote add upstream https://github.com/solana-foundation/developer-content.git
git fetch upstream
git merge upstream/main

This will preserve the original commit history. There is another option to rebase, which will rewrite the commit history to make it appear as though your commits were made after the new upstream changes:

git remote add upstream https://github.com/solana-foundation/developer-content.git
git fetch upstream
git rebase upstream/main
# fix merge conflicts
# then force push
git push --force-with-lease

Some combination of those messed up my commit history but it did seem to solve the immediate problem (those files you noticed that aren't updated with prettier in our forks).

Copy link
Collaborator

@mikemaccana mikemaccana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't reviewed this fully, but it looks good so far - to speed up the review, can you please remove the smart quotes (just use ') and remove the other files from this PR? This will reduce the 'noise' and I'll then check out the remaining changes.

- Create a compressed NFT collection using Metaplex's Bubblegum program
- Mint compressed NFTs using the Bubblegum TS SDK
- Transfer compressed NFTs using the Bubblegum TS SDK
- Create a compressed NFT collection using Metaplex’s Bubblegum program
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for smart quotes. Just use '

negligible. But for now, you'll still need to understand the low level puzzle
pieces, so let's dig in!
use a technique called
[**State Compression**](https://solana.com/docs/advanced/state-compression) to
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice word adding the link for the term.

5. Each branch is then hashed together
2. Create a hash of the data
3. Store the hash as a “leaf” at the bottom of the tree
4. Hash pairs of leaves together, to create “branches”
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, this is much clearer than the older content.

8. Store the root hash onchain as a verifiable proof of the data within each
leaf
8. Store the root hash onchain as a verifiable proof that the data within each
leaf has not changed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also much clearer.

@adpthegreat
Copy link
Contributor Author

Alright I'll do that , the other files from the PR included was because I was trying to fix the prettier CI issues, I'll probably just have to remove the last three or four commits

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants